ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Queue, stack, list and array functions / Array functions
  • Operating mode
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Executes a procedure for each element of a WLanguage array.
This function can be used:
  • on one-dimensional arrays s,
  • New in version 2024
    about arrays associations.
    AndroidAndroid Widget Not available.
Example
tabClient is array of Client
tabClient.Applique(AjoutListe)

INTERNAL PROCEDURE AjoutListe(pClient)
	LISTE_Client.Ajoute(pClient.Nom)
END
Syntax
<Source array>.Apply(<Operation to perform>)
<Source array>: Control name
Name of the Array variable to use. This array can be:
  • a one-dimensional array.
  • New in version 2024
    an array association.
    AndroidAndroid Widget Not available.
<Operation to perform>: WLanguage procedure
Name of the WLanguage procedure to be executed for each element of the <Source array>. This procedure can be:
  • a global or local procedure,
  • an internal procedure.
It is also possible to directly use a lambda procedure.
Remarks

Operating mode

The <Operation to perform> procedure is called for each element of the array. The Procedure receives the following parameters:
  • manipulated element.
  • New in version 2024
    the key to the element.
    In the case of a simple array, the key corresponds to the element index. This parameter is optional.
    In the case of an associative array, the key corresponds to the element indexing key..
    AndroidAndroid Widget Not available.
Not all the results of the calls are stored.

Sequence of functions
You can use array functions in a sequence.
The following functions can be used in a sequence: This sequence can be used as a source for a FOR ALL statement or it can end with one of the following functions: Example:
gnMoyenne = gtabUser.Filtre(cbFiltre).Map(cbTransforme).Mean()
Business / UI classification: Neutral code
Component: wd290vm.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/22/2024

Send a report | Local help